<?php

namespace App\Exceptions;

use App\Common\BusinessCode;
use Throwable;

class PermissionException extends \Exception
{
    public function __construct(string $message = '', int $code = 0, Throwable $previous = null)
    {
        if ($message === '') {
            $message = BusinessCode::$businessCodeMap[$code];
        }
        parent::__construct($message, $code, $previous);
    }
}
